package com.young.rabbitmq.listener;

import com.young.rabbitmq.config.BaseExcahngeQueueConfig;
import com.young.rabbitmq.config.BaseQueueConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerListener {
    /**
     * 基本队列消息监听
     * @param message 接收到的消息
     */
    @RabbitListener(queues = BaseQueueConfig.BASE_QUEUE_NAME)
    public void baseQueueListener(String message){
        System.out.println("消费者接收到的消息为：" + message);
    }
}
